BEGIN;
-- 工作人员类型
INSERT INTO `dictionary` VALUES ('USER_TYPE', '' , '人员类型',null, '',  0,'2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`)
  values ( 'USER_TYPE_USER', 'USER_TYPE', '普通用户', null, null, 0, '2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`)
  values ( 'USER_TYPE_STAFF', 'USER_TYPE', '员工用户', null, null, 0, '2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`)
  values ( 'USER_TYPE_STAFF_MANAGER', 'USER_TYPE_STAFF', '普通管理员',null, null, 0, '2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`,`en_name`, `data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`)
  values ( 'USER_TYPE_STAFF_ROOT', 'USER_TYPE_STAFF', '超级管理员', null, null, 0, '2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`)
  values ( 'USER_TYPE_STAFF_SALES', 'USER_TYPE_STAFF', '销售员工', null, null, 0, '2017-08-05 22:54:07', '2017-08-05 22:54:07', 0, 1, 'administrator');

  -- 语言支持
INSERT INTO `dictionary` VALUES ('LANGUAGE_REGION', '' , '语言', null,null,  0,'2018-12-08 22:54:07', '2018-12-08 22:54:07', 0, 1, 'administrator');
INSERT INTO `dictionary` VALUES ('EN', 'LANGUAGE_REGION' , '英文',null, null,  0,'2018-12-08 22:54:07', '2018-12-08 22:54:07', 0, 1, 'administrator');
INSERT INTO `dictionary` VALUES ('ZH', 'LANGUAGE_REGION' , '中文',null, null,  0,'2018-12-08 22:54:07', '2018-12-08 22:54:07', 0, 1, 'administrator');

INSERT INTO `role` VALUES ('role_root_id', 'ROOT', '超级管理员', '2018-08-30 11:55:19', '2018-08-30 11:55:19', 0);
insert into `role` ( `id`, `code`, `name`, `created_time`, `updated_time`, `deleted`) values ( 'test_id2', 'NORMAL_MANAGER', '普通管理员', '2017-12-27 22:54:07', '2017-12-27 22:54:07', '0');
INSERT INTO `role` VALUES ('test_id', 'test', 'test_name', '2017-08-05 22:54:07', '2017-08-05 22:54:07',  0);
INSERT INTO `role_permission` VALUES ('role_root_id', 'test_id', '2018-09-07 14:29:22');

-- 添加权限菜单
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'menu_cms_dashboard', 'MENU_TYPE', '数据看板', null,'http://img.yidazx.com/image/2019_01_06_01_02_40/cf0a8273-7bd3-47a9-be58-27887d662875', '9999', '2019-01-06 01:43:52', '2019-01-06 01:43:52', '0', '1', null);
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'menu_root', 'MENU_TYPE', '超级管理员', null,null, '0', '2019-01-06 01:43:52', '2019-01-06 01:43:52', '0', '1', null);
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'menu_system_manage', 'MENU_TYPE', '系统管理', null,'http://source.wenxiaoyou.com/test/nav_systerm.png', '0', '2019-01-06 01:43:52', '2019-01-06 01:43:52', '0', '1', null);
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'menu_user', 'MENU_TYPE', '用户管理', null,null, '0', '2019-01-06 01:43:52', '2019-01-06 01:43:52', '0', '1', null);
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'NEI_RONG_GUAN_LI_JTDR', 'MENU_TYPE', '内容管理', null,'http://img.yidazx.com/image/2019_01_06_01_11_42/2c1798f2-9e3e-4f07-821b-8f3dd12792e8', '9899', '2019-01-06 01:08:51', '2019-01-06 01:11:48', '0', '1', 'root');
insert into `dictionary` ( `dic_key`, `parent_key`, `name`, `en_name`,`data`, `sort_order`, `created_time`, `updated_time`, `deleted`, `version`, `operator`) values ( 'SHU_JU_KAN_BAN_GYCR', 'menu_cms_dashboard', '数据看板',null, '', '0', '2019-01-06 01:03:05', '2019-01-06 01:03:05', '0', '1', 'root');

INSERT INTO `user` ( `id`, `tenant_id`, `user_type`, `phone`, `qq_openid`, `wechat_openid`, `miniapp_openid`, `weibo_openid`, `union_id`, `password`, `salt`, `code`,
 `email`, `avatar_url`, `role_id`, `is_vip`, `last_login_ip`, `nickname`, `birthday`, `gender`, `location`, `grade_dic_key`, `student_province`,
 `student_city`, `student_town`, `area`, `instruct`, `forbidden_words`,`locked`,`locked_time`,`ua`,`regist_from`,`device_token`, `vip_expired_time`, `created_time`,`updated_time`,`deleted`,
 `version`,`operator`)
  values ( 'test_id', 'test_id', 'USER_TYPE_STAFF', '15831229772', '1f0c6a3ff04c9f9e806f183e8230897e', 'dc78e5ac14104828a5acf7074b7e905b', 'dc78e5ac14104828a5acf7074b7e905b',
 'dc78e5ac14104828a5acf7074b7e905b', 'test_id', '123456', '123', '123', 'test2@126.com','http://www.baidu.com','role_root_id', 0, '192.168.0.1', 'test','1926/12/12', '男',
 'test_id',  'test_id', 'beijing','beijing', 'beijing', 'beijing',null, 0,  0, null, null, null, null, '2019-01-16 16:29:12', '2019-01-16 16:29:12', '2019-01-16 16:29:12', 0, 1, 'test_id');

INSERT INTO `user` ( `id`, `tenant_id`, `user_type`, `phone`, `qq_openid`, `wechat_openid`, `miniapp_openid`,`weibo_openid`, `union_id`, `password`, `salt`, `code`,
 `email`, `avatar_url`, `role_id`, `is_vip`, `last_login_ip`, `nickname`, `wechat_name`,`birthday`, `gender`, `location`, `grade_dic_key`, `student_province`,
 `student_city`, `student_town`, `area`, `instruct`, `locked`,`locked_time`,`ua`,`regist_from`,`device_token`, `vip_expired_time`, `created_time`,`updated_time`,`deleted`,
 `version`,`operator`)
  values ( 'test_id2', 'test_id', 'USER_TYPE_USER', '12345678902', '1f0c6a3ff04c9f9e806f183e8230897e', 'dc78e5ac14104828a5acf7074b7e905b', 'test_id','dc78e5ac14104828a5acf7074b7e905b',
 'dc78e5ac14104828a5acf7074b7e905b', '123456', '123', '123', 'test2@126.com','http://www.baidu.com','test_id', 0, '192.168.0.1', 'test', '微信昵称','1926/12/12', '男',
 'test_id',  'test_id', 'beijing','beijing', 'beijing', 'beijing', null, 0,  null, null, null, null, '2019-01-16 16:29:12', '2019-01-16 16:29:12', '2019-01-16 16:29:12', 0, 1, 'test_id');

 INSERT INTO `operate_log` VALUES('test_id','test_id','111', '111', '2017-08-05 22:54:07', 'tests');
INSERT INTO `operate_log` VALUES('test_id2','test_id','111', '222', '2017-08-05 22:54:07', 'tests');